home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 32 / CD Expert nº 32.iso / Emergency / emergyus.exe / BC5 / EXAMPLES / SERIES / PVIEW95 / readme.txt
Text File  |  1997-03-25  |  4KB  |  90 lines

  1. PVIEW95 - Based on Gen32
  2.  
  3. THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  4. ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  5. THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  6. PARTICULAR PURPOSE.
  7.  
  8. Copyright (C) 1993-1995  Microsoft Corporation.  All Rights Reserved.
  9.  
  10.  
  11. PURPOSE:
  12.     Show how to use to the 32-bit Toolhelp APIs to enumerate Win32 
  13.     processes, threads, and modules in Windows 95.  Displays information 
  14.     about each process and all threads within a process in listview 
  15.     controls.  Finally, shows how to terminate processes.
  16.  
  17.     IMPORTANT:  This tool DOES NOT RUN ON Windows NT.  It will load, but
  18.                 immediately exits after posting a message box because it
  19.                 calls the new 32-bit Toolhelp API functions which are
  20.                 not implemented in Windows NT 3.1 and 3.5.
  21.  
  22. USES:
  23.     PVIEW95 is a sample which enumerates processes and threads currently
  24.     executing in the system.  While it has a functional use of allowing
  25.     the user to kill processes and get information about them, it is 
  26.     designed to be an example of how to write similar diagnostic and
  27.     development tools.
  28.  
  29.     PROCTHRD.C contains the functions which use the new 32-bit ToolHelp
  30.     functions.  These functions are exported by the Windows 95 KERNEL32.DLL,
  31.     but not the Windows NT KERNEL32.DLL.  It also contains a function to
  32.     abruptly terminate a Win32 process.
  33.  
  34.     LISTVIEW.C contains the functions which manipulate the process and
  35.     thread list view controls.  List view controls were chosen as they
  36.     facilitate adding multiple columns of data which may be sorted by
  37.     clicking on a column header.  
  38.     
  39. INTERFACE:
  40.     PVIEW95 has several non-obvious interface elements.  First, the top 
  41.     list view control lists all active processes, while the bottom
  42.     pane is used to list all threads from a selected process.  You must
  43.     select a process from the list of processes before any data will be
  44.     listed in the thread list.  This is because PVIEW95 only displays
  45.     threads that belong to a single process.
  46.  
  47.     The column headers in both list view controls can be used for sorting 
  48.     the displayed data.  Simply click on a column header and the data will
  49.     be sorted.
  50.  
  51.     The toolbar uses Tooltips--leave the mouse cursor over a Toolbar button
  52.     for a short time and a brief description of the button will appear.
  53.  
  54.     Be careful about terminating processes.  PVIEW95 will allow you to
  55.     kill *any* Win32 process; killing some processes will cause a system
  56.     crash.  PVIEW95 will ask for confirmation before killing any process,
  57.     so you have a second chance before the process will be killed.
  58.  
  59. COMMENTS:
  60.     PVIEW95 is a sample which enumerates processes and threads currently
  61.     executing in the system.  While it has a functional use of allowing
  62.     the user to kill processes and get information about them, it is 
  63.     designed to be an example of how to write similar diagnostic and
  64.     development tools.  As such, it is not supported as a tool.
  65.  
  66.     PVIEW95 has several limitations that shouldn't be present in a real
  67.     tool whose purpose is similar.  A few limitations or features not
  68.     implemented in PVIEW95 that a real tool could provide are:
  69.  
  70.     * Enumerate Win16 processes
  71.     * Enumerate Win16 DLLs
  72.     * Select and unload Win16 DLLs
  73.     * Enumerate all modules within a Win32 process
  74.     * Run on both Windows NT and Windows 95
  75.  
  76.     This is a 32-bit only sample.
  77.  
  78. MODULE MAP:
  79.     Dispatch- Message dispatching routines
  80.     WinMain - Calls initialization functions and processes the message loop
  81.     PView95 - Implements the windows procedure for the main application window
  82.     Init    - Performs application and instance specific initialization
  83.     About   - Defines a standard about dialog box.
  84.     Misc    - Defines the applications specific commands not related to
  85.                 a specific module.
  86.     ProcThrd- Implements process, thread, module enumeration and
  87.                 manipulation functions
  88.     Listview- Implements the process and thread listview controls
  89.     Toolbar - Implements the Toolbar and Tooltips
  90.